\hypertarget{group__Clock}{
\section{Clock}
\label{group__Clock}\index{Clock@{Clock}}
}
\subsection*{组合类型}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structrt__timer}{rt\_\-timer}
\end{DoxyCompactItemize}
\subsection*{宏定义}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__Clock_gaf00c192dcbc7a949beebaec8e8bf9232}{RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED}~0x0
\item 
\#define \hyperlink{group__Clock_ga174b5f60b760b5e421616ff17cb15c4b}{RT\_\-TIMER\_\-FLAG\_\-ACTIVATED}~0x1
\item 
\#define \hyperlink{group__Clock_gae9ef5d12543ac6b2113741ed503fc9c3}{RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT}~0x0
\item 
\#define \hyperlink{group__Clock_ga52a9fd903938762a98408771bd139097}{RT\_\-TIMER\_\-FLAG\_\-PERIODIC}~0x2
\item 
\#define \hyperlink{group__Clock_gad750e1e3947c267e57be487dad3b4300}{RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER}~0x0
\item 
\#define \hyperlink{group__Clock_ga0df6e547917d460610fd734ae84daca3}{RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER}~0x4
\item 
\#define \hyperlink{group__Clock_ga9b1d12b8471acff4c8f9eebb4216c7df}{RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME}~0x0
\item 
\#define \hyperlink{group__Clock_ga2bbc0b4b2a4914c8eea4d1263e52ab85}{RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME}~0x1
\item 
\#define \hyperlink{group__Clock_ga460a57e7d4fe4ea24772affaca3d62bc}{RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT}~0x2
\item 
\#define \hyperlink{group__Clock_ga2e125a6714e6a5ff5756129cadbe3a7d}{RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC}~0x3
\end{DoxyCompactItemize}
\subsection*{类型定义}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Clock_ga32c381b041bcb69be117bcb32273775d}{
typedef struct \hyperlink{structrt__timer}{rt\_\-timer} $\ast$ {\bfseries rt\_\-timer\_\-t}}
\label{group__Clock_ga32c381b041bcb69be117bcb32273775d}

\end{DoxyCompactItemize}
\subsection*{函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Clock_gae62f4fc2660b4b42ec0504ea971315bf}{
void {\bfseries rt\_\-system\_\-tick\_\-init} (void)}
\label{group__Clock_gae62f4fc2660b4b42ec0504ea971315bf}

\item 
\hypertarget{group__Clock_ga6e2aa36f263bddcddae01a91986fcdae}{
\hyperlink{group__BasicDef_ga66c400929925784dba020d671154978a}{rt\_\-tick\_\-t} {\bfseries rt\_\-tick\_\-get} (void)}
\label{group__Clock_ga6e2aa36f263bddcddae01a91986fcdae}

\item 
\hypertarget{group__Clock_ga77af135da16a0b9e1c4a351f4bee6dbd}{
void {\bfseries rt\_\-tick\_\-set} (\hyperlink{group__BasicDef_ga66c400929925784dba020d671154978a}{rt\_\-tick\_\-t} tick)}
\label{group__Clock_ga77af135da16a0b9e1c4a351f4bee6dbd}

\item 
\hypertarget{group__Clock_ga29337f93377626f651dd393e1bb608fb}{
void {\bfseries rt\_\-tick\_\-increase} (void)}
\label{group__Clock_ga29337f93377626f651dd393e1bb608fb}

\item 
\hypertarget{group__Clock_gaf9f1453af745c5feeb9a7f7f065f025b}{
\hyperlink{group__BasicDef_ga66c400929925784dba020d671154978a}{rt\_\-tick\_\-t} {\bfseries rt\_\-tick\_\-from\_\-millisecond} (\hyperlink{group__BasicDef_ga909edcac80e5e3f93f63fcebc95922c7}{rt\_\-uint32\_\-t} ms)}
\label{group__Clock_gaf9f1453af745c5feeb9a7f7f065f025b}

\item 
\hypertarget{group__Clock_ga9f109e873cdcf963059e968cedb76c36}{
void {\bfseries rt\_\-system\_\-timer\_\-init} (void)}
\label{group__Clock_ga9f109e873cdcf963059e968cedb76c36}

\item 
\hypertarget{group__Clock_gac5298e02b109e4885723f6116fb11814}{
void {\bfseries rt\_\-system\_\-timer\_\-thread\_\-init} (void)}
\label{group__Clock_gac5298e02b109e4885723f6116fb11814}

\item 
\hypertarget{group__Clock_ga678d29f53307113da6b1578c9d3423cb}{
void {\bfseries rt\_\-timer\_\-init} (\hyperlink{structrt__timer}{rt\_\-timer\_\-t} timer, const char $\ast$name, void($\ast$timeout)(void $\ast$parameter), void $\ast$parameter, \hyperlink{group__BasicDef_ga66c400929925784dba020d671154978a}{rt\_\-tick\_\-t} time, \hyperlink{group__BasicDef_ga585e2ad0fbab0f83817cb61373465df6}{rt\_\-uint8\_\-t} flag)}
\label{group__Clock_ga678d29f53307113da6b1578c9d3423cb}

\item 
\hypertarget{group__Clock_ga0d1aca4fc86f1dbd88945be8820793bb}{
\hyperlink{group__BasicDef_ga42df42aabf676f2a89f5af2208b79950}{rt\_\-err\_\-t} {\bfseries rt\_\-timer\_\-detach} (\hyperlink{structrt__timer}{rt\_\-timer\_\-t} timer)}
\label{group__Clock_ga0d1aca4fc86f1dbd88945be8820793bb}

\item 
\hypertarget{group__Clock_ga9e6911989135de1b989dd7fe1b3543ce}{
\hyperlink{structrt__timer}{rt\_\-timer\_\-t} {\bfseries rt\_\-timer\_\-create} (const char $\ast$name, void($\ast$timeout)(void $\ast$parameter), void $\ast$parameter, \hyperlink{group__BasicDef_ga66c400929925784dba020d671154978a}{rt\_\-tick\_\-t} time, \hyperlink{group__BasicDef_ga585e2ad0fbab0f83817cb61373465df6}{rt\_\-uint8\_\-t} flag)}
\label{group__Clock_ga9e6911989135de1b989dd7fe1b3543ce}

\item 
\hypertarget{group__Clock_gaf6c147a1f25bd5ac9e72a142ab36a4ac}{
\hyperlink{group__BasicDef_ga42df42aabf676f2a89f5af2208b79950}{rt\_\-err\_\-t} {\bfseries rt\_\-timer\_\-delete} (\hyperlink{structrt__timer}{rt\_\-timer\_\-t} timer)}
\label{group__Clock_gaf6c147a1f25bd5ac9e72a142ab36a4ac}

\item 
\hypertarget{group__Clock_ga3aeb8f8350b3a7403d8629231396c016}{
\hyperlink{group__BasicDef_ga42df42aabf676f2a89f5af2208b79950}{rt\_\-err\_\-t} {\bfseries rt\_\-timer\_\-start} (\hyperlink{structrt__timer}{rt\_\-timer\_\-t} timer)}
\label{group__Clock_ga3aeb8f8350b3a7403d8629231396c016}

\item 
\hypertarget{group__Clock_gaaef9923c8b90ede02e12826c58c6f8a2}{
\hyperlink{group__BasicDef_ga42df42aabf676f2a89f5af2208b79950}{rt\_\-err\_\-t} {\bfseries rt\_\-timer\_\-stop} (\hyperlink{structrt__timer}{rt\_\-timer\_\-t} timer)}
\label{group__Clock_gaaef9923c8b90ede02e12826c58c6f8a2}

\item 
\hypertarget{group__Clock_ga4f59e029dbca9de4db8821a45a0aaf53}{
\hyperlink{group__BasicDef_ga42df42aabf676f2a89f5af2208b79950}{rt\_\-err\_\-t} {\bfseries rt\_\-timer\_\-control} (\hyperlink{structrt__timer}{rt\_\-timer\_\-t} timer, \hyperlink{group__BasicDef_ga585e2ad0fbab0f83817cb61373465df6}{rt\_\-uint8\_\-t} cmd, void $\ast$arg)}
\label{group__Clock_ga4f59e029dbca9de4db8821a45a0aaf53}

\item 
\hypertarget{group__Clock_ga51af0ff7d55ff298adfb87d276d0d678}{
\hyperlink{group__BasicDef_ga66c400929925784dba020d671154978a}{rt\_\-tick\_\-t} {\bfseries rt\_\-timer\_\-next\_\-timeout\_\-tick} (void)}
\label{group__Clock_ga51af0ff7d55ff298adfb87d276d0d678}

\item 
\hypertarget{group__Clock_ga3a29a70b401aa9d5c5dbb7269fd0ac57}{
void {\bfseries rt\_\-timer\_\-check} (void)}
\label{group__Clock_ga3a29a70b401aa9d5c5dbb7269fd0ac57}

\end{DoxyCompactItemize}


\subsection{宏定义文档}
\hypertarget{group__Clock_ga2bbc0b4b2a4914c8eea4d1263e52ab85}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME@{RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME}}
\index{RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME@{RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-CTRL\_\-GET\_\-TIME~0x1}}
\label{group__Clock_ga2bbc0b4b2a4914c8eea4d1263e52ab85}
get timer control command \hypertarget{group__Clock_ga460a57e7d4fe4ea24772affaca3d62bc}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT@{RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT}}
\index{RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT@{RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-CTRL\_\-SET\_\-ONESHOT~0x2}}
\label{group__Clock_ga460a57e7d4fe4ea24772affaca3d62bc}
change timer to one shot \hypertarget{group__Clock_ga2e125a6714e6a5ff5756129cadbe3a7d}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC@{RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC}}
\index{RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC@{RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-CTRL\_\-SET\_\-PERIODIC~0x3}}
\label{group__Clock_ga2e125a6714e6a5ff5756129cadbe3a7d}
change timer to periodic \hypertarget{group__Clock_ga9b1d12b8471acff4c8f9eebb4216c7df}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME@{RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME}}
\index{RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME@{RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-CTRL\_\-SET\_\-TIME~0x0}}
\label{group__Clock_ga9b1d12b8471acff4c8f9eebb4216c7df}
set timer control command \hypertarget{group__Clock_ga174b5f60b760b5e421616ff17cb15c4b}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-FLAG\_\-ACTIVATED@{RT\_\-TIMER\_\-FLAG\_\-ACTIVATED}}
\index{RT\_\-TIMER\_\-FLAG\_\-ACTIVATED@{RT\_\-TIMER\_\-FLAG\_\-ACTIVATED}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-FLAG\_\-ACTIVATED}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-FLAG\_\-ACTIVATED~0x1}}
\label{group__Clock_ga174b5f60b760b5e421616ff17cb15c4b}
timer is active \hypertarget{group__Clock_gaf00c192dcbc7a949beebaec8e8bf9232}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED@{RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED}}
\index{RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED@{RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-FLAG\_\-DEACTIVATED~0x0}}
\label{group__Clock_gaf00c192dcbc7a949beebaec8e8bf9232}
clock \& timer macros timer is deactive \hypertarget{group__Clock_gad750e1e3947c267e57be487dad3b4300}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER@{RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER}}
\index{RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER@{RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-FLAG\_\-HARD\_\-TIMER~0x0}}
\label{group__Clock_gad750e1e3947c267e57be487dad3b4300}
hard timer,the timer's callback function will be called in tick isr. \hypertarget{group__Clock_gae9ef5d12543ac6b2113741ed503fc9c3}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT@{RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT}}
\index{RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT@{RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-FLAG\_\-ONE\_\-SHOT~0x0}}
\label{group__Clock_gae9ef5d12543ac6b2113741ed503fc9c3}
one shot timer \hypertarget{group__Clock_ga52a9fd903938762a98408771bd139097}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-FLAG\_\-PERIODIC@{RT\_\-TIMER\_\-FLAG\_\-PERIODIC}}
\index{RT\_\-TIMER\_\-FLAG\_\-PERIODIC@{RT\_\-TIMER\_\-FLAG\_\-PERIODIC}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-FLAG\_\-PERIODIC}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-FLAG\_\-PERIODIC~0x2}}
\label{group__Clock_ga52a9fd903938762a98408771bd139097}
periodic timer \hypertarget{group__Clock_ga0df6e547917d460610fd734ae84daca3}{
\index{Clock@{Clock}!RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER@{RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER}}
\index{RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER@{RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER}!Clock@{Clock}}
\subsubsection[{RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER}]{\setlength{\rightskip}{0pt plus 5cm}\#define RT\_\-TIMER\_\-FLAG\_\-SOFT\_\-TIMER~0x4}}
\label{group__Clock_ga0df6e547917d460610fd734ae84daca3}
soft timer,the timer's callback function will be called in timer thread. 